-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update logging #3097
Update logging #3097
Conversation
8a80711
to
79cc810
Compare
👓 @tjhop |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great to me (aside from the comment about the test fixtures, and the build updates -- unsure if we'd rather separate those bits).
Can we also enable the sloglint
linter in golanci-lint? It's disabled by default:
Lines 2 to 5 in b9d0932
enable: | |
- depguard | |
- misspell | |
- revive |
@@ -130,7 +128,7 @@ func (h *handler) innerHandler(filters ...string) (http.Handler, error) { | |||
handler = promhttp.HandlerFor( | |||
prometheus.Gatherers{h.exporterMetricsRegistry, r}, | |||
promhttp.HandlerOpts{ | |||
ErrorLog: stdlog.New(log.NewStdlibAdapter(level.Error(h.logger)), "", 0), | |||
ErrorLog: slog.NewLogLogger(h.logger.Handler(), slog.LevelError), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
79cc810
to
63e3c2e
Compare
Switch from promlog/go-kit to promslog/slog for logging. * Update Go build to 1.23. Signed-off-by: Ben Kochie <[email protected]>
63e3c2e
to
c1a6f9a
Compare
Sync dependencies and log using the machinery introduced in prometheus#3097. Signed-off-by: Pranshu Srivastava <[email protected]>
Sync dependencies and log using the machinery introduced in prometheus#3097. Signed-off-by: Pranshu Srivastava <[email protected]>
Sync dependencies and log using the machinery introduced in prometheus#3097. Signed-off-by: Pranshu Srivastava <[email protected]>
Sync dependencies and log using the machinery introduced in prometheus#3097. Signed-off-by: Pranshu Srivastava <[email protected]>
Log using the machinery introduced in prometheus#3097. Signed-off-by: Pranshu Srivastava <[email protected]>
Log using the machinery introduced in #3097. Signed-off-by: Pranshu Srivastava <[email protected]>
Switch from promlog/go-kit to promslog/slog for logging.